<template>
  <div>插件测试</div>
  <button @click="show">点击加载插件效果</button>
</template>

<script setup lang="ts">
import { getCurrentInstance } from 'vue';
const instance = getCurrentInstance();
const show = () => {
  // 调用插件中的全局方法
  instance?.proxy?.$customPlugin.show();
  setTimeout(() => {
    instance?.proxy?.$customPlugin.hide();
  }, 2000);
};
</script>
